// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // »Project« Talina Gaming System (TgS) (∂) // »File« TgS Common - Math [Matrix].h // »Author« Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com) // »Version« 4.0 // ------------------------------------------------------------------------------------------------------------------------------ // // Copyright: © 2002-2010, Andrew Aye. All Rights Reserved. // This software is free for non-commercial use. Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // Redistributions of source code must retain this copyright notice, this list of conditions and the following disclaimers. // Redistributions in binary form must reproduce this copyright notice, this list of conditions and the following // disclaimers in the documentation and other materials provided with the distribution. // Neither the names of the copyright owner nor the names of its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // The intellectual property rights of the algorithms used reside with Andrew Aye. You may not use this software, in whole or // in part, in support of any commercial product without the express written consent of the author. // There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is". // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // #if !defined(_TGS_COMMON_MATH_MATRIX_H_) #define _TGS_COMMON_MATH_MATRIX_H_ #pragma once // START TGS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef union { struct { TgFLOAT32 f11,f12,f13,f21,f22,f23,f31,f32,f33; } m; struct { TgVEC_F32_03 r0, r1, r2; } v; TgFLOAT32 m_atyElement[9]; TgFLOAT32 m_atyRowCol[3][3]; TgVEC_F32_03 m_atvRow[3]; } TgMAT_F32_33; typedef union { struct { TgFLOAT64 f11,f12,f13,f21,f22,f23,f31,f32,f33; } m; struct { TgVEC_F64_03 r0, r1, r2; } v; TgFLOAT64 m_atyElement[9]; TgFLOAT64 m_atyRowCol[3][3]; TgVEC_F64_03 m_atvRow[3]; } TgMAT_F64_33; typedef union { struct { TgFLOAT32 f11,f12,f13,f14,f21,f22,f23,f24,f31,f32,f33,f34; } m; struct { TgVEC_F32_04 r0, r1, r2; } v; TgFLOAT32 m_atyElement[12]; TgFLOAT32 m_atyRowCol[3][4]; TgVEC_F32_04 m_atvRow[3]; } TgMAT_F32_34; typedef union { struct { TgFLOAT64 f11,f12,f13,f14,f21,f22,f23,f24,f31,f32,f33,f34; } m; struct { TgVEC_F64_04 r0, r1, r2; } v; TgFLOAT64 m_atyElement[12]; TgFLOAT64 m_atyRowCol[3][4]; TgVEC_F64_04 m_atvRow[3]; } TgMAT_F64_34; typedef union { struct { TgFLOAT32 f11,f12,f13,f14,f21,f22,f23,f24,f31,f32,f33,f34,f41,f42,f43,f44; } m; struct { TgVEC_F32_04 r0, r1, r2, r3; } v; TgFLOAT32 m_atyElement[16]; TgFLOAT32 m_atyRowCol[4][4]; TgVEC_F32_04 m_atvRow[4]; } TgMAT_F32_44; typedef union { struct { TgFLOAT64 f11,f12,f13,f14,f21,f22,f23,f24,f31,f32,f33,f34,f41,f42,f43,f44; } m; struct { TgVEC_F64_04 r0, r1, r2, r3; } v; TgFLOAT64 m_atyElement[16]; TgFLOAT64 m_atyRowCol[4][4]; TgVEC_F64_04 m_atvRow[4]; } TgMAT_F64_44; // SIMD Vectors TgTYPE_PREFIX( TgMAT_F32_34 ); TgTYPE_PREFIX( TgMAT_F32_44 ); // Non-SIMD Floating Point Vectors TgTYPE_PREFIX( TgMAT_F32_33 ); TgTYPE_PREFIX( TgMAT_F64_33 ); TgTYPE_PREFIX( TgMAT_F64_34 ); TgTYPE_PREFIX( TgMAT_F64_44 ); #endif // END ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////